package com.haiqi.modules.report.service;

import com.github.pagehelper.PageInfo;
import com.haiqi.common.bean.PageBean;
import com.haiqi.common.persistence.dao.AccidentReportMapper;
import com.haiqi.common.persistence.entity.AccidentReport;
import com.haiqi.common.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by hythzx on 2016/5/24.
 */

@Service
public class AccidentReportService {

    @Autowired
    private AccidentReportMapper accidentReportMapper;

    public PageInfo<AccidentReport> getList(AccidentReport accidentReport, PageBean page){
        PageUtils.generatePage(page);
        List<AccidentReport> dataList = accidentReportMapper.getDataList(accidentReport);
        PageInfo<AccidentReport> pageInfo = new PageInfo(dataList);
        return pageInfo;
    }


}
